package cn.bdqn.witcity.service;

import cn.bdqn.witcity.entity.Order;
import cn.bdqn.witcity.entity.vo.OrderVo;
import cn.bdqn.witcity.mapper.OrderMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class OrderServiceImpl implements OrderService {
    @Resource
    OrderMapper orderMapper;

    @Override
    public int addOrder(Order order) {
        return orderMapper.addOrder(order);
    }

    @Override
    public int updateOrder(Order order) {
        return orderMapper.updateOrder(order);
    }

    @Override
    public Order findById(Integer id) {
        return orderMapper.findById(id);
    }

    @Override
    public List<OrderVo> findAll() {
        return orderMapper.findAll();
    }

    @Override
    public int getAllCount() {
        return orderMapper.getAllCount();
    }

    @Override
    public List<OrderVo> findOrderById(Integer id) {
        return orderMapper.findOrderById(id);
    }

    @Override
    public int findCountById(Integer id) {
        return orderMapper.findCountById(id);
    }
}
